package com.chunhe.sojourn.common.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.HashMap;
import java.util.Map;

public class BaseController {

    protected Map<String, Object> getDataTable(IPage<?> pageInfo) {
        Map<String, Object> rspData = new HashMap<>();
        rspData.put("data", pageInfo.getRecords());
        rspData.put("count", pageInfo.getTotal());
        rspData.put("code",0);
        return rspData;
    }


}
